<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app"></div>

  <script src="./js/react.development.js"></script>
  <script src="./js/react-dom.development.js"></script>
  <script>
    // 1. 创建虚拟DOM/虚拟节点
    /* 
    React.createElement(
      type,  // 标签名   h1
      [props], // 标签属性 {title: '你好, React!'}
      [...children] // n个所有子节点  Hello React!
    )
    */
    const vDom = React.createElement(
      'div',
      null, // 没有标签属性
      React.createElement('h2', {title: '北京疫情'}, '你关注的北京疫情'),
      React.createElement('p', null, '北京这段时间疫情还在持续中...')
    )

    // 2. 渲染虚拟DOM
     /* 
    ReactDOM.render(
      element, // React元素
      container // 页面上的容器元素
    )
    */
    ReactDOM.render(vDom, document.querySelector('#app'))

  </script>
</body>
</html>